﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<script type="text/javascript">

    var g = null;
    $(function () {
        var controllerName = '@ViewBag.ControllerName';
            g = $("#maingrid4").ligerGrid({
                columns: [
                {
                    display: '权限名称', name: 'PermissionName', align: 'left', width: 150, minWidth: 60
                },
                {
                    display: 'ID', name: 'PID', align: 'left', width: 100, minWidth: 60
                 , hide: true
                },
                  {
                      display: '控制器', name: 'PermissionController', align: 'left', width: 200, minWidth: 60
                  },
                {
                    display: '动作', name: 'PermissionAction', align: 'left', width: 200, minWidth: 60
                },
                  {
                      display: '图标', name: 'Icon', isSort: false, align: 'left', width: 200, minWidth: 50
                    , render: function (item) {
                        return "<div style='width:100%;height:100%;'><img src='" + item.Icon + "' /></div>";
                    }
                  },
                 {
                     display: '描述', name: 'Description', align: 'left', width: 300, minWidth: 60
                 }
                ], pageSize: 10, width: '100%', height: '100%', checkbox: false
            });
            g.set('parms', { controllerName: controllerName, sortname: 'PermissionController' });
            g.set('url', '@Url.Content("~/MenusButtonsManage/SelectPermission")');
            $("#pageloading").hide();
        });
        function f_select() {
            return g.getSelectedRow();
        }

</script>
</head>

<body style="padding: 6px; overflow: hidden;">
    <div id="maingrid4" style="margin: 0; padding: 0"></div>
    <div style="display: none;">
        <!-- g data total ttt -->
    </div>
